<div class="row">
  <div class="col-lg-12">
    <div class="panel panel-primary">
      <div class="panel-body" ng-init="send('app.index', {})">
        <p>
          <a ui-sref="setting.app.create" title="新增加应用"><i class="fa fa-plus-square-o fa-1x prefix"></i>新增应用</a>
        </p>

        <hr>

        <div class="row">
          <div class="col-lg-8">
            <div ui-view></div>
          </div>
        </div>

        <div ng-switch on="app_index.length">
          <p class="text-warning" ng-switch-when="0">
            <i class="fa fa-exclamation-circle fa-4x"></i>
            <span>
              目前应用商店还没有应用，请点击右上方的 <i class="fa fa-plus-square-o fa-2x"></i> 号注册新的应用。
            </span>
          </p>

          <div ng-switch-default>
            <div class="row content">
              <div class="col-lg-3 well" ng-repeat="e in app_index" style="margin: 0.5em;">
                <h4><i class="fa fa-paw fa-2x prefix text-info"></i>{{e.name}}
                  <small><a href ng-click="send('app.destroy', {id: e.appid});">
                      <i class="fa fa-minus-circle fa-2x text-danger pull-right"></i>
                  </a></small>
                </h4>
                <p><b>{{e.appid}}</b><br><small>{{e.author}}<br>
                    {{e.release}}, 于{{e.released_at}}发布</small></p>
                <p><small>{{e.callback.url}}</small></p>
                <hr>
                <p>{{e.descr}}</p>
                <hr>
                <p><small>
                  <b>系统设置</b><br>
                  {{e.settings}}
                </small></p>
              </div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>
